package com.nvwa.dto.err;

/**
 * 自定义异常类
 */
public class BusinezzException extends RuntimeException {

    protected ErrorCode errorCode;


    public BusinezzException(final ErrorCode errorCode) {
        super(errorCode.getMsg());
        this.errorCode = errorCode;
    }

    public BusinezzException(final String msg) {
        super(msg);
        this.errorCode = ErrorCode.UNKNOW;
    }

    public BusinezzException(final ErrorCode errorCode, final Throwable t) {
        super(errorCode.getMsg(), t);
        this.errorCode = errorCode;
    }

    public ErrorCode getErrorCode() {
        return errorCode;
    }

}